<template>
    <view class="content">
        <view class="top" :style="{ paddingTop: systemInfo.titleTop + 'px' }">
            <view class="main-title dispaly-center"
                :style="{ height: systemInfo.sBarHeight + 'px', lineHeight: systemInfo.sBarHeight + 'px' }">
                <view class="nav-top dispaly-just-between" :style="{ 'width': 750 - barWidth * 2 + 'rpx' }">
                    <view class="back" @click="navTo(`back`)">
                        <tn-icon name="left" color="#000" size="40" />
                    </view>
                </view>
            </view>
            <view class="con">
                <view class="tip dispaly-col-center">
                    <view class="item">是否在职或离职公考培训人员？</view>
                </view>
                <view class="btn-boxs">
                    <view class="one btn dispaly-align-center"
                        @click="navTo(`/subPackage/mine/teacherEnter/formPageOne?is_train=${1}&is_gov=${is_gov}`)">是
                    </view>
                    <view class="two btn dispaly-align-center" @click="cancel">否</view>
                </view>
            </view>
        </view>
    </view>
</template>

<script setup lang="ts">
import { navTo } from '@/utils/util';
import { ref, onMounted } from 'vue'
import { getElementHeight } from '@/utils/util'
import { onLoad } from '@dcloudio/uni-app';

let is_gov = ref<number>()
onLoad((option) => {
    is_gov.value = option?.is_gov
})
const systemInfo = uni.getStorageSync('systemInfo')
const { barWidth } = uni.getStorageSync('capsule')
// 获取top高度
const topNavheight = ref<number | unknown>(0)
onMounted(async () => {
    const height = await getElementHeight('.top')
    topNavheight.value = height
})

const cancel = () => {
    uni.switchTab({
        url: '/pages/mine/mine'
    })
}


</script>

<style>
page {
    background: rgb(155, 227, 229);
    background: linear-gradient(180deg, rgba(155, 227, 229, 1) 0%, rgba(255, 255, 255, 1) 36%, rgba(244, 244, 246, 1) 100%);
}
</style>

<style lang="scss" scoped>
.top {
    position: fixed;
    z-index: 999;
    top: 0;
}

.back {
    padding-left: 30rpx;
}

.con {
    padding: 117rpx 71rpx;

    .tip {
        .item {
            font-family: PingFang SC, PingFang SC;
            font-weight: 800;
            font-size: 40rpx;
            color: #000000;
        }
    }

    .btn-boxs {
        display: flex;
        flex-direction: column;

        .one {
            margin: 260rpx 0 63rpx 0;
            border: 2rpx solid #008298;
            color: #008298;
        }

        .two {
            color: #000000;
            background: #F5F5F5;
        }

        .btn {
            width: 608rpx;
            height: 80rpx;
            border-radius: 15rpx;
            font-family: PingFang SC, PingFang SC;
            font-weight: bold;
            font-size: 26rpx;
        }
    }
}
</style>